package com.ck.express.utils

import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
import com.fasterxml.jackson.module.kotlin.registerKotlinModule
import kotlinx.serialization.json.Json

object JsonUtil {
    val objectMapper = jacksonObjectMapper().apply {
        registerKotlinModule() // 支持 Kotlin data class
    }

    val json = Json {
        encodeDefaults = true
        ignoreUnknownKeys = true
    }
}